<!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="format-detection" content="telephone=no">
    <title>违章查询</title>
    <style>
        body{
            margin:0;
            padding:0;
            overflow-x: hidden;
            overflow-y: hidden;
        }
        .window{
            min-height:500px;
        }
        @media screen and ( min-width: 750px ){
            .window{
                max-width: 750px;
                margin: auto;
                margin-top: 10px;
            }
        }
    </style>
    <script src="__STATIC__/jquery-2.1.4.min.js"></script>
</head>
<body>
<div class="window">
    <!--<iframe id="weizhang" name="weizhang" src="{:U('Page/api',['domain'=>'m.cheshouye.com','query'=>urlencode('/api/weizhang/?t=0a3278')])}" width="100%" height="100%" frameborder="0" scrolling="no"></iframe>-->
    <iframe id="weizhang" name="weizhang" src="http://m.cheshouye.com/api/weizhang/?t=0a3278" width="100%" height="100%" frameborder="0" scrolling="auto"></iframe>
</div>
</body>
<script>
    $(function(){
        change_window();

        window.onresize = function (){
            change_window();
        };
        function change_window(){
            console.log('改变了大小');
            var $window = $(".window"), $width = $window.width(), $height = $(window).height();
            console.log($width);
            $window.each(function(i){
                var $this = $($window[i]);
                console.log($this);
                $this.find("iframe").width($width);
                $this.find("iframe").height($height);
            })
        }
//        window.onload = function(){
//            console.log("flag");
//            var $document = $("#weizhang").contents(),
//                $link = $document.find("link"), $script = $document.find("script");
//
//            $link.each(function(i){
//                var $this = $($link[i]);
//                $this.attr('href',"http://m.cheshouye.com"+$this.attr('href'));
//            });
//            $script.each(function(i){
//                var $this = $($script[i]);
//                if ( $this.attr('src') ) {
//                    $this.attr('src',"http://m.cheshouye.com"+$this.src('src'));
//                }
//            });
//        };
    });
</script>
</html>